<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算本息合计</title>
</head>
<body>
    <script>
        var a =3;
        var b = 2.75;
        var c=100000;
        document.write("<pre>")
        document.write("存款金额："+c+"元\n");
        document.write("存款年限："+a+"年\n");
        document.write("年利率："+b+"%\n");
        document.write("存款3年后本息合计："+(c+c*(b/100)*a)+"元");
        document.write("</pre>")
    </script>
</body>
</html>